package edu.hwadee.BEIS.repository;

import edu.hwadee.BEIS.entity.CountyUser;
import edu.hwadee.BEIS.entity.LeaderUser;
import edu.hwadee.BEIS.entity.SchoolUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import edu.hwadee.BEIS.entity.Announcement;

import java.util.List;
import java.util.Set;

public interface AnnouncementRepository extends JpaRepository<Announcement, Integer> {

    Page<Announcement> findBySchoolUsers(Pageable pageable, Set<SchoolUser> schoolUsers);

    Page<Announcement> findByCountyUsers(Pageable pageable, Set<CountyUser> countyUsers);

    Page<Announcement> findByLeaderUsers(Pageable pageable, Set<LeaderUser> leaderUsers);

}
